import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {FormsModule,} from '@angular/forms';
import {ScrollingModule} from '@angular/cdk/scrolling';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {PageComponent} from './page.component';
import {SysUserModule} from './system/user/sysuser.module';


const routes: Routes = [
  {
    path: 'page',
    component: PageComponent,
    /*canActivateChild: [PermissionGurid],*/
    children: [
      {path: 'welcome', loadChildren: () => import('./system/welcome/welcome.module').then(m => m.WelcomeModule)},
      {path: 'system/dept', loadChildren: () => import('./system/dept/sysdept.module').then(m => m.SysDeptModule)},
      {path: 'system/role', loadChildren: () => import('./system/role/role.module').then(m => m.RoleModule)},
      {path: 'system/user', loadChildren: () => import('./system/user/sysuser.module').then(m => m.SysUserModule)},
    ]
  }

];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    ScrollingModule,
    NgZorroAntdModule,
    RouterModule.forChild(routes)
  ],
  exports: [
    RouterModule,
    PageComponent
  ],
  declarations: [PageComponent],
})
export class PageModule {
}
